﻿using KeYan.Service.Common.Enum;
using KeYan.Service.IService.Shop;
using KeYan.Service.Model.Shop;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace KeYan.Service.API.Shop
{
    [Route("api/[controller]")]
    [ApiController]
    public class ServeController : ControllerBase
    {
        private readonly ServeIService _serve;
        public ServeController(ServeIService serve)
        {
            _serve = serve;
        }
        /// <summary>
        /// 购买服务
        /// </summary>
        /// <param name="serviceName">服务名</param>
        /// <param name="serveInfo"></param>
        /// <returns></returns>
        [HttpPost,Route("AddShopping")]
        public Task<Resilt<int>> AddShopping(int ServeId, ServeInfo serveInfo)
        {
            return _serve.AddShopping(ServeId, serveInfo);
        }
    }
}
